<!DOCTYPE html>
<html>
<head>
<title>分类表</title>
<#include "/header.html">
	  <link rel="stylesheet" href="${request.contextPath}/statics/plugins/fileinput/fileinput.css">
	<link rel="stylesheet" href="${request.contextPath}/statics/css/addcss.css">
	<script src="${request.contextPath}/statics/plugins/fileinput/fileinput.js"></script>
    <script src="${request.contextPath}/statics/plugins/fileinput/zh.js"></script>
<link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
<link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
<script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
<!-- <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
 --><script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.boostrap-treetable.js"></script>  

</head>
<body>
	<div id="rrapp" v-cloak>
		<div v-show="showList">
			<div class="grid-btn">
			<div class="form-group ">
				<select id="search_channelId" name="channelId" class="selectpicker" @keyup.enter="query" 
							data-live-search="true" v-model="search.channelId">

				</select>
				<input type="text" class="form-control"  v-model="search.name"  @keyup.enter="query" placeholder="分类名称"     style="width: 17%;display: inline-block;">
	 		<a class="btn btn-default" @click="query">查询</a>
	 		</div>
			
				<#if shiro.hasPermission("good:category:save")> <a
					class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
				</#if>
				<#if shiro.hasPermission("good:category:update")> <a
					class="btn btn-primary" @click="update"><i
					class="fa fa-pencil-square-o"></i>&nbsp;修改</a> </#if>
				<#if shiro.hasPermission("good:category:delete")> <a
					class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
				</#if>
				
			 
				 
			 
 		</div>
 		 
			<table id="menuTable" data-mobile-responsive="true" data-click-to-select="true">
			<thead>
			<tr>
				<th data-field="selectItem" data-checkbox="true"></th>
			</tr>
			</thead>
		</table>
		</div>

		<div v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>
			<form class="form-horizontal">
				<div class="form-group">
					<div class="col-sm-2 control-label">父分类</div>
					<div class="col-sm-10">
						<input type="text" class="form-control"
							v-model="category.parentName" placeholder="父分类"
							@click="menuTree" readonly="readonly" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">频道</div>
					<div class="col-sm-10">
						<select id="channelId" name="channelId" class="selectpicker"
							data-live-search="true" v-model="category.channelId">

						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">分类名称</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="category.name"
							placeholder="分类名称" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">排序</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="category.sort"
							placeholder="排序" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">目录类型  </div>
					<label class="radio-inline"> <input type="radio" disabled
						name="type" value="1" v-model="category.type" /> 一级目录
					</label> <label class="radio-inline"> <input type="radio"
						name="type" value="2" v-model="category.type" disabled/> 二级目录
					</label>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">状态是否显示</div>
					<label class="radio-inline"> <input type="radio"
						name="status" value="1" v-model="category.status" /> 显示
					</label> <label class="radio-inline"> <input type="radio"
						name="status" value="0" v-model="category.status" /> 隐藏
					</label>
					 
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">导航栏</div>
					<label class="radio-inline"> <input type="radio"
						name="nav" value="1" v-model="category.showInNav" /> 显示
					</label> <label class="radio-inline"> <input type="radio"
						name="nav" value="0" v-model="category.showInNav" /> 隐藏
					</label>
				 
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">为你推荐</div>
					<label class="radio-inline"> <input type="radio"
						name="showInCommend" value="1" v-model="category.showInCommend" /> 推荐
					</label> <label class="radio-inline"> <input type="radio"
						name="showInCommend" value="0" v-model="category.showInCommend" /> 默认
					</label>
				 
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">是否置顶 </div>
					<label class="radio-inline"> <input type="radio"
						name="showInTop" value="1" v-model="category.showInTop" /> 置顶
					</label> <label class="radio-inline"> <input type="radio"
						name="showInTop" value="0" v-model="category.showInTop" /> 默认
					</label>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">是否热门 </div>
					<label class="radio-inline"> <input type="radio"
						name="showInHot" value="1" v-model="category.showInHot" /> 热门
					</label> <label class="radio-inline"> <input type="radio"
						name="showInHot" value="0" v-model="category.showInHot" /> 默认
					</label>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">页面标题</div>
					<div class="col-sm-10">
						<input type="text" class="form-control"
							v-model="category.pageTitle" placeholder="页面标题" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">页面描述</div>
					<div class="col-sm-10">
						<input type="text" class="form-control"
							v-model="category.pageDescription" placeholder="页面描述" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">页面关键词</div>
					<div class="col-sm-10">
						<input type="text" class="form-control"
							v-model="category.pageKeyword" placeholder="页面关键词" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">备注信息</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="category.remarks"
							placeholder="备注信息" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label"></div>
					<input type="button" class="btn btn-primary" @click="saveOrUpdate"
						value="确定" /> &nbsp;&nbsp;<input type="button"
						class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</form>
		</div>
	</div>

	<!--  -->
	<!-- 图片预览 -->
	 	<div id="iconLayer" style="display: none; padding: 10px;">
		<div class="itemb tabitem"> 
	           			<form class="form-horizontal" method="post" id="uploadForm" enctype="multipart/form-data">
		                    <div class="form-group">
		                        <label for=" "  class="col-sm-2 control-label">商品相册</label>
		                        <div class="col-sm-10">
		                       		<!-- <div id="gallery" v-for> 
							         	<img src="${request.contextPath}/public/favicon.ico" width="70" height="70" alt=""> 
							        </div> -->
							         <div class="file-loading col-sm-10">
			                            <input id="input-702" name="files" type="file" >
			                        </div>
		                       	</div>
		                    </div> 
	               		 </form>
	           		</div>
	 </div>
	 
	<!-- 选择菜单 -->
	<div id="menuLayer" style="display: none; padding: 10px;">
		<ul id="menuTree" class="ztree"></ul>
	</div>

	<script
		src="${request.contextPath}/statics/js/modules/good/category.js?_${.now?long}"></script>

</body>
</html>